package br.com.albatroz.et;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.sql.Date;

@Entity
@Table (name="tb_partida")
public final class Partida extends AbstractEntity{
	
	@ManyToOne
	@JoinColumn (nullable=false)
	private Time home;
	
	@ManyToOne
	@JoinColumn (nullable=false)
	private Time visitor;
	
	@Column (name="scheduled_date")
	private Date scheduledDate;
	
	@ManyToOne
	@JoinColumn (nullable = true)
	private Campeonato campeonato;
	
	public Partida(){
		super();
	}
	
	public Time getHome() {
		return home;
	}
	public void setHome(Time home) {
		this.home = home;
	}
	public Time getVisitor() {
		return visitor;
	}
	public void setVisitor(Time visitor) {
		this.visitor = visitor;
	}
	public Date getScheduledDate() {
		return scheduledDate;
	}
	public void setScheduledDate(Date scheduledDate) {
		this.scheduledDate = scheduledDate;
	}

	public Campeonato getCampeonato() {
		return campeonato;
	}

	public void setCampeonato(Campeonato campeonato) {
		this.campeonato = campeonato;
	}
	
}
